package lab02.test21;

/**
 * Created by leovo on 2017/11/1.
 */
public class Text {
    public static void main(String[] args) {
        String str="hello!";
        int count=0;
        int i,j=0;
        for (i=0;i<=str.length();i++);{
            String getStr=str.substring(i,i+1);
            if(getStr.equals("o")){
                count++;
            }
            if(getStr.equals("o"))
        {
            j++;
        }
    }
        System.out.print("o:"+j);
}
    }
